package com.dews.course.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dews.common.utils.DateUtils;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * 学业成绩成绩统计对象 dews_degree_grade
 *
 * @author qingfeng
 * @date 2025-02-03
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ToString
@TableName("dews_degree_grade")
public class DegreeGrade{

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键ID")
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("用户ID")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty("必修学分")
    @TableField("compulsory_credits")
    private Double compulsoryCredits;

    @ApiModelProperty("选修学分")
    @TableField("elective_credits")
    private Double electiveCredits;

    @ApiModelProperty("学分绩点")
    @TableField("grade_point")
    private Double gradePoint;

    @ApiModelProperty("课外学分")
    @TableField("extracurricular_credits")
    private Double extracurricularCredits;

    @ApiModelProperty("学绩分")
    @TableField("academic_score")
    private Double academicScore;

    @ApiModelProperty("创建时间")
    @TableField("create_time")
    @DateTimeFormat(pattern = DateUtils.YYYY_MM_DD_HH_MM_SS)
    @JsonFormat(pattern = DateUtils.YYYY_MM_DD_HH_MM_SS, timezone = DateUtils.GMT)
    private LocalDateTime createTime;

    @ApiModelProperty("修改时间")
    @TableField("update_time")
    @DateTimeFormat(pattern = DateUtils.YYYY_MM_DD_HH_MM_SS)
    @JsonFormat(pattern = DateUtils.YYYY_MM_DD_HH_MM_SS, timezone = DateUtils.GMT)
    private LocalDateTime updateTime;


}
